/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * SRCMain.java
 *
 * Created on May 25, 2010, 12:54:42 PM
 */
package UserInterface;

import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author subx
 */
public class SRCMain extends javax.swing.JFrame {

    final private String LOOKANDFEEL = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";

    /** Creates new form SRCMain */
    public SRCMain() {
        try {
            //Modifica o Look and Feel da janela.
            UIManager.setLookAndFeel(LOOKANDFEEL);
            SwingUtilities.updateComponentTreeUI(this);
            initComponents();
        } catch (ClassNotFoundException e) {
            System.err.println("Couldn't find class for look and feel: "
                    + LOOKANDFEEL);
            System.err.println("Using default look and feel.");
        } catch (UnsupportedLookAndFeelException e) {
            System.err.println("Can't use the specified look and feel ("
                    + LOOKANDFEEL + ") in this plataform.");
            System.err.println("Using default look and feel.");
        } catch (Exception e) {
            System.err.println("Couldn't get specified look and feel ("
                    + LOOKANDFEEL + ") for some reason.");
            System.err.println("Using default look and feel.");
            e.printStackTrace();
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        logo = new javax.swing.JLabel();
        infoPanel = new UserInterface.InformationPanel();
        progressBarLabel = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        mapCanvas = new UserInterface.MapCanvas();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        startItem = new UserInterface.SRCMenuItem();
        loadConfigItem = new UserInterface.SRCMenuItem();
        unloadConfigItem = new UserInterface.SRCMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        exitItem = new UserInterface.SRCMenuItem();
        jMenu2 = new javax.swing.JMenu();
        configsItem = new UserInterface.SRCMenuItem();
        logItem = new UserInterface.SRCMenuItem();
        jMenu3 = new javax.swing.JMenu();
        siteItem = new UserInterface.SRCMenuItem();
        docItem = new UserInterface.SRCMenuItem();
        aboutItem = new UserInterface.SRCMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("SRC - Sistema de Roteamento de Carteiros");
        setResizable(false);

        logo.setIcon(new javax.swing.ImageIcon("/home/subx/NetBeansProjects/ProjetoSRC/images/SRC-Logo.png")); // NOI18N

        infoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Informações"));
        infoPanel.setPreferredSize(new java.awt.Dimension(202, 357));

        javax.swing.GroupLayout infoPanelLayout = new javax.swing.GroupLayout(infoPanel);
        infoPanel.setLayout(infoPanelLayout);
        infoPanelLayout.setHorizontalGroup(
            infoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 190, Short.MAX_VALUE)
        );
        infoPanelLayout.setVerticalGroup(
            infoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 330, Short.MAX_VALUE)
        );

        progressBarLabel.setFont(new java.awt.Font("DejaVu Sans", 1, 11)); // NOI18N
        progressBarLabel.setText("Progresso:");

        jTabbedPane1.addTab("Mapa", mapCanvas);

        jMenu1.setText("Arquivo");

        startItem.setText("Iniciar");

        jMenu1.add(startItem);

        loadConfigItem.setText("Carregar Configurações");

        jMenu1.add(loadConfigItem);

        unloadConfigItem.setText("Descarregar Configurações");

        jMenu1.add(unloadConfigItem);
        jMenu1.add(jSeparator1);

        exitItem.setText("Sair");

        jMenu1.add(exitItem);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Exibir");

        configsItem.setText("Configurações");

        jMenu2.add(configsItem);

        logItem.setText("Log");

        jMenu2.add(logItem);

        jMenuBar1.add(jMenu2);

        jMenu3.setText("Ajuda");

        siteItem.setText("SRC no Google Code");

        jMenu3.add(siteItem);

        docItem.setText("Documentação");

        jMenu3.add(docItem);

        aboutItem.setText("Sobre");

        jMenu3.add(aboutItem);

        jMenuBar1.add(jMenu3);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(31, 31, 31)
                        .addComponent(logo))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(infoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(progressBarLabel)))
                .addGap(18, 18, 18)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 660, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(34, 34, 34)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 570, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(logo)
                        .addGap(18, 18, 18)
                        .addComponent(infoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(progressBarLabel)))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new SRCMain().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private UserInterface.SRCMenuItem aboutItem;
    private UserInterface.SRCMenuItem configsItem;
    private UserInterface.SRCMenuItem docItem;
    private UserInterface.SRCMenuItem exitItem;
    private UserInterface.InformationPanel infoPanel;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private UserInterface.SRCMenuItem loadConfigItem;
    private UserInterface.SRCMenuItem logItem;
    private javax.swing.JLabel logo;
    private UserInterface.MapCanvas mapCanvas;
    private javax.swing.JLabel progressBarLabel;
    private UserInterface.SRCMenuItem siteItem;
    private UserInterface.SRCMenuItem startItem;
    private UserInterface.SRCMenuItem unloadConfigItem;
    // End of variables declaration//GEN-END:variables
}
